home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / webmon_1 / frmmainw.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-09  |  33.1 KB  |  1,045 lines

  1. VERSION 5.00
  2. Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "msinet.ocx"
  3. Object = "{24365B29-A3B5-11D1-B8B0-444553540000}#1.0#0"; "Xfxforms.ocx"
  4. Object = "{BB859389-001D-11D1-8E83-00805F3AEC32}#1.0#0"; "Systray.ocx"
  5. Begin VB.Form frmMain 
  6.    BackColor       =   &H00FF8080&
  7.    BorderStyle     =   0  'None
  8.    Caption         =   "Form1"
  9.    ClientHeight    =   6210
  10.    ClientLeft      =   4320
  11.    ClientTop       =   3150
  12.    ClientWidth     =   9270
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   6210
  17.    ScaleWidth      =   9270
  18.    ShowInTaskbar   =   0   'False
  19.    Begin VB.Timer tmrHide 
  20.       Enabled         =   0   'False
  21.       Interval        =   2
  22.       Left            =   4080
  23.       Top             =   2880
  24.    End
  25.    Begin VB.Timer tmrScroll 
  26.       Interval        =   50
  27.       Left            =   7560
  28.       Top             =   360
  29.    End
  30.    Begin VB.Timer tmrUpdater 
  31.       Interval        =   1000
  32.       Left            =   4200
  33.       Top             =   1680
  34.    End
  35.    Begin VB.TextBox txtPingThis 
  36.       Height          =   285
  37.       Left            =   5760
  38.       TabIndex        =   26
  39.       Top             =   5520
  40.       Width           =   1575
  41.    End
  42.    Begin InetCtlsObjects.Inet inetWeb 
  43.       Left            =   2400
  44.       Top             =   2040
  45.       _ExtentX        =   1005
  46.       _ExtentY        =   1005
  47.       _Version        =   327681
  48.    End
  49.    Begin VB.Timer tmrAlert 
  50.       Enabled         =   0   'False
  51.       Index           =   2
  52.       Interval        =   1000
  53.       Left            =   3360
  54.       Top             =   1200
  55.    End
  56.    Begin VB.Timer tmrAlert 
  57.       Enabled         =   0   'False
  58.       Index           =   0
  59.       Interval        =   10000
  60.       Left            =   2400
  61.       Top             =   1200
  62.    End
  63.    Begin SysTrayCtl.cSysTray cSysTray1 
  64.       Left            =   2880
  65.       Top             =   2040
  66.       _ExtentX        =   900
  67.       _ExtentY        =   900
  68.       InTray          =   -1  'True
  69.       TrayIcon        =   "frmMainWeb.frx":0000
  70.       TrayTip         =   ""
  71.    End
  72.    Begin VB.Timer tmrAlert 
  73.       Enabled         =   0   'False
  74.       Index           =   1
  75.       Interval        =   1000
  76.       Left            =   2880
  77.       Top             =   1200
  78.    End
  79.    Begin VB.Timer tmrMon 
  80.       Interval        =   50000
  81.       Left            =   3840
  82.       Top             =   1200
  83.    End
  84.    Begin xfxFormShaper.FormShaper FormShaper1 
  85.       Left            =   9240
  86.       Top             =   5160
  87.       _ExtentX        =   1852
  88.       _ExtentY        =   1296
  89.    End
  90.    Begin VB.Line Line20 
  91.       BorderColor     =   &H0000FF00&
  92.       X1              =   240
  93.       X2              =   3720
  94.       Y1              =   5640
  95.       Y2              =   5640
  96.    End
  97.    Begin VB.Label Label13 
  98.       BackColor       =   &H00000000&
  99.       Height          =   255
  100.       Left            =   120
  101.       TabIndex        =   35
  102.       Top             =   5640
  103.       Width           =   3735
  104.    End
  105.    Begin VB.Line Line19 
  106.       BorderColor     =   &H0000FF00&
  107.       X1              =   240
  108.       X2              =   3720
  109.       Y1              =   5160
  110.       Y2              =   5160
  111.    End
  112.    Begin VB.Line Line18 
  113.       BorderColor     =   &H00FF00FF&
  114.       X1              =   240
  115.       X2              =   3720
  116.       Y1              =   4920
  117.       Y2              =   4920
  118.    End
  119.    Begin VB.Label lblInfo 
  120.       BackColor       =   &H00000000&
  121.       Height          =   255
  122.       Left            =   120
  123.       TabIndex        =   34
  124.       Top             =   4920
  125.       Width           =   3735
  126.    End
  127.    Begin VB.Line Line17 
  128.       BorderColor     =   &H0000FF00&
  129.       X1              =   240
  130.       X2              =   240
  131.       Y1              =   5160
  132.       Y2              =   5640
  133.    End
  134.    Begin VB.Line Line16 
  135.       BorderColor     =   &H0000FF00&
  136.       X1              =   3720
  137.       X2              =   3720
  138.       Y1              =   5160
  139.       Y2              =   5640
  140.    End
  141.    Begin VB.Line Line15 
  142.       BorderColor     =   &H0000FF00&
  143.       X1              =   1320
  144.       X2              =   1320
  145.       Y1              =   5160
  146.       Y2              =   5640
  147.    End
  148.    Begin VB.Line Line14 
  149.       BorderColor     =   &H0000FF00&
  150.       X1              =   360
  151.       X2              =   3840
  152.       Y1              =   5640
  153.       Y2              =   5640
  154.    End
  155.    Begin VB.Line Line13 
  156.       BorderColor     =   &H0000FF00&
  157.       X1              =   240
  158.       X2              =   3720
  159.       Y1              =   5400
  160.       Y2              =   5400
  161.    End
  162.    Begin VB.Line Line12 
  163.       BorderColor     =   &H0000FF00&
  164.       X1              =   240
  165.       X2              =   3720
  166.       Y1              =   5160
  167.       Y2              =   5160
  168.    End
  169.    Begin VB.Label Label10 
  170.       BackColor       =   &H00000000&
  171.       Caption         =   "    Next Scan"
  172.       ForeColor       =   &H0000FFFF&
  173.       Height          =   255
  174.       Left            =   120
  175.       TabIndex        =   33
  176.       Top             =   5400
  177.       Width           =   1335
  178.    End
  179.    Begin VB.Label lblNextcheck 
  180.       BackColor       =   &H00000000&
  181.       ForeColor       =   &H0000FFFF&
  182.       Height          =   255
  183.       Left            =   1440
  184.       TabIndex        =   32
  185.       Top             =   5400
  186.       Width           =   2415
  187.    End
  188.    Begin VB.Line Line11 
  189.       BorderColor     =   &H00FF00FF&
  190.       X1              =   240
  191.       X2              =   3720
  192.       Y1              =   4920
  193.       Y2              =   4920
  194.    End
  195.    Begin VB.Label lblCurrentTime 
  196.       BackColor       =   &H00000000&
  197.       ForeColor       =   &H0000FFFF&
  198.       Height          =   255
  199.       Left            =   1440
  200.       TabIndex        =   31
  201.       Top             =   5160
  202.       Width           =   2415
  203.    End
  204.    Begin VB.Label Label1 
  205.       BackColor       =   &H00000000&
  206.       Caption         =   "    Current Time"
  207.       ForeColor       =   &H0000FFFF&
  208.       Height          =   255
  209.       Left            =   120
  210.       TabIndex        =   30
  211.       Top             =   5160
  212.       Width           =   1335
  213.    End
  214.    Begin VB.Line Line10 
  215.       BorderColor     =   &H00FF00FF&
  216.       X1              =   240
  217.       X2              =   3720
  218.       Y1              =   4920
  219.       Y2              =   4920
  220.    End
  221.    Begin VB.Label lblScroll 
  222.       BackStyle       =   0  'Transparent
  223.       Caption         =   "WebMon WebServer Service Monitor"
  224.       BeginProperty Font 
  225.          Name            =   "Comic Sans MS"
  226.          Size            =   18
  227.          Charset         =   0
  228.          Weight          =   400
  229.          Underline       =   0   'False
  230.          Italic          =   0   'False
  231.          Strikethrough   =   0   'False
  232.       EndProperty
  233.       Height          =   615
  234.       Left            =   -6120
  235.       TabIndex        =   29
  236.       Top             =   240
  237.       Width           =   6375
  238.    End
  239.    Begin VB.Shape Shape5 
  240.       Height          =   855
  241.       Left            =   0
  242.       Shape           =   4  'Rounded Rectangle
  243.       Top             =   120
  244.       Width           =   9255
  245.    End
  246.    Begin VB.Line Line9 
  247.       BorderColor     =   &H00FF00FF&
  248.       X1              =   3720
  249.       X2              =   3720
  250.       Y1              =   3720
  251.       Y2              =   4920
  252.    End
  253.    Begin VB.Line Line8 
  254.       BorderColor     =   &H00FF00FF&
  255.       X1              =   240
  256.       X2              =   240
  257.       Y1              =   3720
  258.       Y2              =   4920
  259.    End
  260.    Begin VB.Line Line7 
  261.       BorderColor     =   &H00FF00FF&
  262.       X1              =   240
  263.       X2              =   3720
  264.       Y1              =   3720
  265.       Y2              =   3720
  266.    End
  267.    Begin VB.Line Line6 
  268.       BorderColor     =   &H00FF00FF&
  269.       X1              =   240
  270.       X2              =   3720
  271.       Y1              =   4920
  272.       Y2              =   4920
  273.    End
  274.    Begin VB.Line Line5 
  275.       BorderColor     =   &H00FF00FF&
  276.       X1              =   240
  277.       X2              =   3720
  278.       Y1              =   4680
  279.       Y2              =   4680
  280.    End
  281.    Begin VB.Line Line4 
  282.       BorderColor     =   &H00FF00FF&
  283.       X1              =   240
  284.       X2              =   3720
  285.       Y1              =   4440
  286.       Y2              =   4440
  287.    End
  288.    Begin VB.Line Line3 
  289.       BorderColor     =   &H00FF00FF&
  290.       X1              =   240
  291.       X2              =   3720
  292.       Y1              =   4200
  293.       Y2              =   4200
  294.    End
  295.    Begin VB.Line Line2 
  296.       BorderColor     =   &H00FF00FF&
  297.       X1              =   240
  298.       X2              =   3720
  299.       Y1              =   3960
  300.       Y2              =   3960
  301.    End
  302.    Begin VB.Line Line1 
  303.       BorderColor     =   &H00FF00FF&
  304.       X1              =   1320
  305.       X2              =   1320
  306.       Y1              =   3720
  307.       Y2              =   4920
  308.    End
  309.    Begin VB.Label Label11 
  310.       BackColor       =   &H00000000&
  311.       Caption         =   "Label11"
  312.       Height          =   735
  313.       Left            =   6600
  314.       TabIndex        =   28
  315.       Top             =   3840
  316.       Width           =   2535
  317.    End
  318.    Begin VB.Label lblPStats2 
  319.       BackColor       =   &H00000000&
  320.       BeginProperty Font 
  321.          Name            =   "MS Sans Serif"
  322.          Size            =   9.75
  323.          Charset         =   0
  324.          Weight          =   400
  325.          Underline       =   0   'False
  326.          Italic          =   0   'False
  327.          Strikethrough   =   0   'False
  328.       EndProperty
  329.       ForeColor       =   &H0000FFFF&
  330.       Height          =   375
  331.       Left            =   4200
  332.       TabIndex        =   27
  333.       Top             =   4560
  334.       Width           =   4935
  335.    End
  336.    Begin VB.Image Image4 
  337.       Height          =   480
  338.       Left            =   8280
  339.       Picture         =   "frmMainWeb.frx":0452
  340.       ToolTipText     =   "Hide"
  341.       Top             =   5400
  342.       Width           =   480
  343.    End
  344.    Begin VB.Image Image3 
  345.       Height          =   480
  346.       Left            =   7560
  347.       Picture         =   "frmMainWeb.frx":0894
  348.       ToolTipText     =   "Manual Ping"
  349.       Top             =   5400
  350.       Width           =   480
  351.    End
  352.    Begin VB.Label lblTimeMS 
  353.       BackColor       =   &H00000000&
  354.       ForeColor       =   &H0000FFFF&
  355.       Height          =   255
  356.       Left            =   5400
  357.       TabIndex        =   25
  358.       Top             =   4320
  359.       Width           =   1215
  360.    End
  361.    Begin VB.Label Label9 
  362.       BackColor       =   &H00000000&
  363.       Caption         =   "Time in m/s"
  364.       ForeColor       =   &H0000FFFF&
  365.       Height          =   255
  366.       Left            =   4200
  367.       TabIndex        =   24
  368.       Top             =   4320
  369.       Width           =   1215
  370.    End
  371.    Begin VB.Label lblBytesRecieved 
  372.       BackColor       =   &H00000000&
  373.       ForeColor       =   &H0000FFFF&
  374.       Height          =   255
  375.       Left            =   5400
  376.       TabIndex        =   23
  377.       Top             =   4080
  378.       Width           =   1215
  379.    End
  380.    Begin VB.Label Label8 
  381.       BackColor       =   &H00000000&
  382.       Caption         =   "Bytes Recieved"
  383.       ForeColor       =   &H0000FFFF&
  384.       Height          =   255
  385.       Left            =   4200
  386.       TabIndex        =   22
  387.       Top             =   4080
  388.       Width           =   1215
  389.    End
  390.    Begin VB.Label lblBytesSent 
  391.       BackColor       =   &H00000000&
  392.       ForeColor       =   &H0000FFFF&
  393.       Height          =   255
  394.       Left            =   5400
  395.       TabIndex        =   21
  396.       Top             =   3840
  397.       Width           =   1215
  398.    End
  399.    Begin VB.Label Label7 
  400.       BackColor       =   &H00000000&
  401.       Caption         =   "Bytes Sent"
  402.       ForeColor       =   &H0000FFFF&
  403.       Height          =   255
  404.       Left            =   4200
  405.       TabIndex        =   20
  406.       Top             =   3840
  407.       Width           =   1215
  408.    End
  409.    Begin VB.Label lblPingStatus 
  410.       BackColor       =   &H00000000&
  411.       BeginProperty Font 
  412.          Name            =   "MS Sans Serif"
  413.          Size            =   9.75
  414.          Charset         =   0
  415.          Weight          =   400
  416.          Underline       =   0   'False
  417.          Italic          =   0   'False
  418.          Strikethrough   =   0   'False
  419.       EndProperty
  420.       ForeColor       =   &H0000FFFF&
  421.       Height          =   615
  422.       Left            =   4200
  423.       TabIndex        =   19
  424.       Top             =   3240
  425.       Width           =   4935
  426.    End
  427.    Begin VB.Image Image2 
  428.       Height          =   480
  429.       Left            =   5160
  430.       Picture         =   "frmMainWeb.frx":0CD6
  431.       ToolTipText     =   "Reset Alarms"
  432.       Top             =   5400
  433.       Width           =   480
  434.    End
  435.    Begin VB.Image Image1 
  436.       Height          =   480
  437.       Left            =   4440
  438.       Picture         =   "frmMainWeb.frx":1118
  439.       ToolTipText     =   "Add New Server"
  440.       Top             =   5400
  441.       Width           =   480
  442.    End
  443.    Begin VB.Image imgIcon 
  444.       Height          =   480
  445.       Index           =   0
  446.       Left            =   3480
  447.       Top             =   2040
  448.       Visible         =   0   'False
  449.       Width           =   480
  450.    End
  451.    Begin VB.Image imgIcon 
  452.       Height          =   480
  453.       Index           =   1
  454.       Left            =   5400
  455.       Top             =   1320
  456.       Visible         =   0   'False
  457.       Width           =   480
  458.    End
  459.    Begin VB.Label lblDT 
  460.       BackColor       =   &H00000000&
  461.       ForeColor       =   &H0000FFFF&
  462.       Height          =   255
  463.       Left            =   1440
  464.       TabIndex        =   18
  465.       Top             =   4680
  466.       Width           =   2415
  467.    End
  468.    Begin VB.Label lblFailed 
  469.       BackColor       =   &H00000000&
  470.       ForeColor       =   &H0000FFFF&
  471.       Height          =   255
  472.       Left            =   1440
  473.       TabIndex        =   17
  474.       Top             =   4440
  475.       Width           =   2415
  476.    End
  477.    Begin VB.Label Label6 
  478.       BackColor       =   &H00000000&
  479.       Caption         =   "    Down Time"
  480.       ForeColor       =   &H0000FFFF&
  481.       Height          =   255
  482.       Left            =   120
  483.       TabIndex        =   16
  484.       Top             =   4680
  485.       Width           =   1335
  486.    End
  487.    Begin VB.Label Label5 
  488.       BackColor       =   &H00000000&
  489.       Caption         =   "    Last Failed"
  490.       ForeColor       =   &H0000FFFF&
  491.       Height          =   255
  492.       Left            =   120
  493.       TabIndex        =   15
  494.       Top             =   4440
  495.       Width           =   1335
  496.    End
  497.    Begin VB.Label lblLastCheck 
  498.       BackColor       =   &H00000000&
  499.       ForeColor       =   &H0000FFFF&
  500.       Height          =   255
  501.       Left            =   1440
  502.       TabIndex        =   14
  503.       Top             =   4200
  504.       Width           =   2415
  505.    End
  506.    Begin VB.Label Label4 
  507.       BackColor       =   &H00000000&
  508.       Caption         =   "    Last Checked "
  509.       ForeColor       =   &H0000FFFF&
  510.       Height          =   255
  511.       Left            =   120
  512.       TabIndex        =   13
  513.       Top             =   4200
  514.       Width           =   1335
  515.    End
  516.    Begin VB.Label lblURL 
  517.       BackColor       =   &H00000000&
  518.       ForeColor       =   &H0000FFFF&
  519.       Height          =   255
  520.       Left            =   1440
  521.       TabIndex        =   12
  522.       Top             =   3960
  523.       Width           =   2415
  524.    End
  525.    Begin VB.Label label3 
  526.       BackColor       =   &H00000000&
  527.       Caption         =   "    URL"
  528.       ForeColor       =   &H0000FFFF&
  529.       Height          =   255
  530.       Left            =   120
  531.       TabIndex        =   11
  532.       Top             =   3960
  533.       Width           =   1335
  534.    End
  535.    Begin VB.Label lblMName 
  536.       Alignment       =   2  'Center
  537.       BackColor       =   &H00000000&
  538.       BeginProperty Font 
  539.          Name            =   "Comic Sans MS"
  540.          Size            =   14.25
  541.          Charset         =   0
  542.          Weight          =   400
  543.          Underline       =   0   'False
  544.          Italic          =   0   'False
  545.          Strikethrough   =   0   'False
  546.       EndProperty
  547.       ForeColor       =   &H0000FFFF&
  548.       Height          =   495
  549.       Left            =   120
  550.       TabIndex        =   10
  551.       Top             =   3240
  552.       Width           =   3735
  553.    End
  554.    Begin VB.Label lblIP 
  555.       BackColor       =   &H00000000&
  556.       ForeColor       =   &H0000FFFF&
  557.       Height          =   255
  558.       Left            =   1440
  559.       TabIndex        =   9
  560.       Top             =   3720
  561.       Width           =   2415
  562.    End
  563.    Begin VB.Label Label2 
  564.       BackColor       =   &H00000000&
  565.       Caption         =   "    IP Address"
  566.       ForeColor       =   &H0000FFFF&
  567.       Height          =   255
  568.       Left            =   120
  569.       TabIndex        =   8
  570.       Top             =   3720
  571.       Width           =   1335
  572.    End
  573.    Begin VB.Shape Shape4 
  574.       Height          =   855
  575.       Left            =   4080
  576.       Shape           =   4  'Rounded Rectangle
  577.       Top             =   5160
  578.       Width           =   5055
  579.    End
  580.    Begin VB.Shape Shape3 
  581.       BackColor       =   &H00000000&
  582.       Height          =   1935
  583.       Left            =   4080
  584.       Shape           =   4  'Rounded Rectangle
  585.       Top             =   3120
  586.       Width           =   5175
  587.    End
  588.    Begin VB.Shape Shape2 
  589.       BackColor       =   &H00000000&
  590.       Height          =   2895
  591.       Left            =   0
  592.       Shape           =   4  'Rounded Rectangle
  593.       Top             =   3120
  594.       Width           =   3975
  595.    End
  596.    Begin VB.Label lblServer 
  597.       Alignment       =   2  'Center
  598.       BackColor       =   &H00000000&
  599.       BeginProperty Font 
  600.          Name            =   "MS Sans Serif"
  601.          Size            =   13.5
  602.          Charset         =   0
  603.          Weight          =   400
  604.          Underline       =   0   'False
  605.          Italic          =   0   'False
  606.          Strikethrough   =   0   'False
  607.       EndProperty
  608.       ForeColor       =   &H0000FFFF&
  609.       Height          =   735
  610.       Index           =   7
  611.       Left            =   6960
  612.       TabIndex        =   7
  613.       Top             =   2160
  614.       Visible         =   0   'False
  615.       Width           =   2055
  616.    End
  617.    Begin VB.Label lblServer 
  618.       Alignment       =   2  'Center
  619.       BackColor       =   &H00000000&
  620.       BeginProperty Font 
  621.          Name            =   "MS Sans Serif"
  622.          Size            =   13.5
  623.          Charset         =   0
  624.          Weight          =   400
  625.          Underline       =   0   'False
  626.          Italic          =   0   'False
  627.          Strikethrough   =   0   'False
  628.       EndProperty
  629.       ForeColor       =   &H0000FFFF&
  630.       Height          =   735
  631.       Index           =   6
  632.       Left            =   6960
  633.       TabIndex        =   6
  634.       Top             =   1200
  635.       Visible         =   0   'False
  636.       Width           =   2055
  637.    End
  638.    Begin VB.Label lblServer 
  639.       Alignment       =   2  'Center
  640.       BackColor       =   &H00000000&
  641.       BeginProperty Font 
  642.          Name            =   "MS Sans Serif"
  643.          Size            =   13.5
  644.          Charset         =   0
  645.          Weight          =   400
  646.          Underline       =   0   'False
  647.          Italic          =   0   'False
  648.          Strikethrough   =   0   'False
  649.       EndProperty
  650.       ForeColor       =   &H0000FFFF&
  651.       Height          =   735
  652.       Index           =   5
  653.       Left            =   4680
  654.       TabIndex        =   5
  655.       Top             =   2160
  656.       Visible         =   0   'False
  657.       Width           =   2055
  658.    End
  659.    Begin VB.Label lblServer 
  660.       Alignment       =   2  'Center
  661.       BackColor       =   &H00000000&
  662.       BeginProperty Font 
  663.          Name            =   "MS Sans Serif"
  664.          Size            =   13.5
  665.          Charset         =   0
  666.          Weight          =   400
  667.          Underline       =   0   'False
  668.          Italic          =   0   'False
  669.          Strikethrough   =   0   'False
  670.       EndProperty
  671.       ForeColor       =   &H0000FFFF&
  672.       Height          =   735
  673.       Index           =   3
  674.       Left            =   2400
  675.       TabIndex        =   4
  676.       Top             =   2160
  677.       Visible         =   0   'False
  678.       Width           =   2055
  679.    End
  680.    Begin VB.Label lblServer 
  681.       Alignment       =   2  'Center
  682.       BackColor       =   &H00000000&
  683.       BeginProperty Font 
  684.          Name            =   "MS Sans Serif"
  685.          Size            =   13.5
  686.          Charset         =   0
  687.          Weight          =   400
  688.          Underline       =   0   'False
  689.          Italic          =   0   'False
  690.          Strikethrough   =   0   'False
  691.       EndProperty
  692.       ForeColor       =   &H0000FFFF&
  693.       Height          =   735
  694.       Index           =   4
  695.       Left            =   4680
  696.       TabIndex        =   3
  697.       Top             =   1200
  698.       Visible         =   0   'False
  699.       Width           =   2055
  700.    End
  701.    Begin VB.Label lblServer 
  702.       Alignment       =   2  'Center
  703.       BackColor       =   &H00000000&
  704.       BeginProperty Font 
  705.          Name            =   "MS Sans Serif"
  706.          Size            =   13.5
  707.          Charset         =   0
  708.          Weight          =   400
  709.          Underline       =   0   'False
  710.          Italic          =   0   'False
  711.          Strikethrough   =   0   'False
  712.       EndProperty
  713.       ForeColor       =   &H0000FFFF&
  714.       Height          =   735
  715.       Index           =   2
  716.       Left            =   2400
  717.       TabIndex        =   2
  718.       Top             =   1200
  719.       Visible         =   0   'False
  720.       Width           =   2055
  721.    End
  722.    Begin VB.Label lblServer 
  723.       Alignment       =   2  'Center
  724.       BackColor       =   &H00000000&
  725.       BeginProperty Font 
  726.          Name            =   "MS Sans Serif"
  727.          Size            =   13.5
  728.          Charset         =   0
  729.          Weight          =   400
  730.          Underline       =   0   'False
  731.          Italic          =   0   'False
  732.          Strikethrough   =   0   'False
  733.       EndProperty
  734.       ForeColor       =   &H0000FFFF&
  735.       Height          =   735
  736.       Index           =   1
  737.       Left            =   120
  738.       TabIndex        =   1
  739.       Top             =   2160
  740.       Visible         =   0   'False
  741.       Width           =   2055
  742.    End
  743.    Begin VB.Label lblServer 
  744.       Alignment       =   2  'Center
  745.       BackColor       =   &H00000000&
  746.       BeginProperty Font 
  747.          Name            =   "MS Sans Serif"
  748.          Size            =   13.5
  749.          Charset         =   0
  750.          Weight          =   400
  751.          Underline       =   0   'False
  752.          Italic          =   0   'False
  753.          Strikethrough   =   0   'False
  754.       EndProperty
  755.       ForeColor       =   &H0000FFFF&
  756.       Height          =   735
  757.       Index           =   0
  758.       Left            =   120
  759.       TabIndex        =   0
  760.       Top             =   1200
  761.       Visible         =   0   'False
  762.       Width           =   2055
  763.    End
  764.    Begin VB.Shape Shape1 
  765.       Height          =   1935
  766.       Left            =   0
  767.       Shape           =   4  'Rounded Rectangle
  768.       Top             =   1080
  769.       Width           =   9255
  770.    End
  771. Attribute VB_Name = "frmMain"
  772. Attribute VB_GlobalNameSpace = False
  773. Attribute VB_Creatable = False
  774. Attribute VB_PredeclaredId = True
  775. Attribute VB_Exposed = False
  776. Dim mmflag As Boolean
  777. Dim sax As Integer
  778. Dim beepcount As Integer
  779. Dim Say As Integer
  780. Public intServClicked As Integer
  781. Private Sub cSysTray1_MouseDblClick(Button As Integer, Id As Long)
  782.     If Button = 1 Then 'left mouse button
  783.         CForm.Show
  784.     End If
  785. End Sub
  786. Private Sub cSysTray1_MouseDown(Button As Integer, Id As Long)
  787.     If Button = 2 Then 'right mouse button
  788.         PopupMenu frmPopups.mnuQuitMain
  789.     End If
  790. End Sub
  791. Private Sub Form_Load()
  792. If App.PrevInstance = True Then
  793.     MsgBox ("You are already running an instance of this application")
  794.         'prevent a conflict of registry settings
  795.     End
  796. End If
  797.  Me.Hide
  798.     'If LSetting("TOP") = "" Then
  799.        ' SSetting "TOP", Me.Top
  800.    ' End If
  801.     'If LSetting("LEFT") = "" Then
  802.     '    SSetting "LEFT", Me.Left
  803.    ' End If
  804.     'Me.Top = LSetting("TOP")
  805.     'Me.Left = LSetting("LEFT")
  806.     App.TaskVisible = False
  807.     intNoOfServers = Val(LSetting("NoOfServers"))
  808.     modWeb.refresh
  809.     With FormShaper1
  810.         .ShapeIt ' shape the form
  811.     End With
  812.     Set CForm = Me
  813. End Sub
  814. Private Sub Form_Unload(Cancel As Integer)
  815.     SSetting "TOP", Me.Top
  816.     SSetting "LEFT", Me.Left
  817. End Sub
  818. Private Sub Image1_Click()
  819.     blnEdit = False
  820.     frmNewServer.Show
  821. End Sub
  822. Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  823.    Image1.BorderStyle = 1
  824. End Sub
  825. Private Sub Image2_Click()
  826.     Dim X As Integer
  827.     For X = tmrAlert.LBound To tmrAlert.UBound
  828.         tmrAlert(X).Enabled = False ' disable all timers in the alert control array
  829.     Next X
  830.     For X = FrmGateWay.tmrAlert2.LBound To FrmGateWay.tmrAlert2.UBound
  831.         FrmGateWay.tmrAlert2(X).Enabled = False
  832.     Next X
  833.     Set cSysTray1.TrayIcon = imgIcon(0).Picture 'set tray icon
  834.     For X = lblServer.LBound To lblServer.UBound
  835.         lblServer(X).BackColor = &O0& ' set all labels to black
  836.     Next X
  837.     For X = FrmGateWay.lblGateWay.LBound To FrmGateWay.lblGateWay.UBound
  838.         FrmGateWay.lblGateWay(X).BackColor = &O0& ' set all labels to black
  839.     Next X
  840. End Sub
  841. Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  842.      Image2.BorderStyle = 1
  843. End Sub
  844. Private Sub Image3_Click()
  845.     Dim ECHO As ICMP_ECHO_REPLY
  846.     frmMain.lblBytesSent = ""
  847.     frmMain.lblBytesRecieved = ""
  848.     frmMain.lblTimeMS = ""
  849.     frmMain.lblPingStatus.Caption = ""
  850.     lblPStats2.Caption = ""
  851.     If Val(txtPingThis) > 0 And InStr(1, txtPingThis, ".") > 1 Then 'ensure that ip address is valid syntax
  852.        frmMain.lblPingStatus.Caption = "Pinging " & txtPingThis & _
  853.                     "with 9 bytes of Data................."
  854.     Call Ping(txtPingThis, ECHO)
  855.         frmMain.lblBytesSent = "9" ' am sending 'Echo This' which is 9 bytes
  856.         frmMain.lblBytesRecieved = ECHO.DataSize ' the data recieved back this should be 9 if successful
  857.         frmMain.lblTimeMS = ECHO.RoundTripTime 'time taken in m/s
  858.         frmMain.lblPingStatus.Caption = GetStatusCode(ECHO.status) 'status code see modping for details
  859.         Select Case Val(GetStatusCode(ECHO.status))
  860.             Case 0
  861.                SayThis "Pinged the server " & txtPingThi & ". The ping was successful"
  862.                 lblPStats2.Caption = "Successful ping to " & txtPingThis
  863.             Case Else
  864.                 frmMain.lblPStats2.Caption = "Unable to ping " & txtPingThis
  865.                 SayThis "Couldnt Ping the server " & txtPingThis & ". The ping was UnSuccessful"
  866.         End Select
  867.     Else
  868.         MsgBox ("Can't ping that!")
  869.     End If
  870. End Sub
  871. Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  872.     Image3.BorderStyle = 1
  873. End Sub
  874. Private Sub Image4_Click()
  875.     tmrHide.Enabled = True
  876. End Sub
  877. Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  878.     Image4.BorderStyle = 1
  879. End Sub
  880. Private Sub lblServer_Click(Index As Integer)
  881.     lblIP = LSetting("IP" & Index)
  882.     lblMName = LSetting("MName" & Index)
  883.     lblURL = LSetting("URL" & Index)
  884.     lblLastCheck = LSetting("Lcheck" & Index)
  885.     lblFailed = LSetting("Lfail" & Index)
  886.     If LSetting("DownSince" & Index) <> "" Then
  887.         lblDT = ConvertToHMS(DateDiff("s", LSetting("DownSince" & Index), Now)) 'convert seconds to minutes and seconds
  888.     Else
  889.         lblDT = "None"
  890.     End If
  891.     intServClicked = Index
  892. End Sub
  893. Private Sub lblServer_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  894.     Dim intLabs As Integer
  895.     If Button = 2 Then
  896.         intServClicked = Index
  897.         If blnRebooting(Index) = True Then
  898.             frmPopups.mnuReboot.Caption = "Abort Reboot"
  899.         Else
  900.             frmPopups.mnuReboot.Caption = "Reboot Server"
  901.         End If
  902.         PopupMenu frmPopups.mnuMain
  903.         For intLabs = lblServer.LBound To lblServer.UBound
  904.             lblServer(intLabs).Visible = False
  905.         Next intLabs
  906.         modWeb.refresh 'refresh server list
  907.     End If
  908. End Sub
  909. Private Sub lblServer_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  910.     lblServer(Index).BorderStyle = 1
  911.     lblServer(Index).ToolTipText = LSetting("URL" & Index)
  912. End Sub
  913. Private Sub tmrAlert_Timer(Index As Integer)
  914.     If Index = 0 Then
  915.         tmrAlert(0).Enabled = False
  916.         tmrAlert(1).Enabled = True
  917.         tmrAlert(2).Enabled = True
  918.     End If
  919.     If Index = 1 Then
  920.         DoEvents
  921.         Beep
  922.         beepcount = beepcount + 1
  923.     If beepcount = 5 Then
  924.         beepcount = 0
  925.         tmrAlert(1).Enabled = False
  926.         tmrAlert(0).Enabled = True
  927.     End If
  928.     End If
  929.     If Index = 2 Then
  930.         If cSysTray1.TrayIcon = imgIcon(0).Picture Then
  931.             Set cSysTray1.TrayIcon = imgIcon(1).Picture
  932.         Else
  933.             Set cSysTray1.TrayIcon = imgIcon(0).Picture
  934.         End If
  935.     End If
  936. End Sub
  937. Private Sub tmrHide_Timer()
  938.     Me.Hide
  939. End Sub
  940. Private Sub TmrMon_Timer()
  941.     Dim Y As Integer
  942.     Dim tmpURL As String
  943.     Dim strErrMsg As String
  944.     Dim strM As String
  945.     Dim strS As String
  946.     For Y = 0 To Val(LSetting("NoOfServers")) - 1
  947.         tmpURL = LSetting("URL" & Y)
  948.         If modWeb.CheckUrl(tmpURL, frmMain) = False Then
  949.             'failed test
  950.             lblServer(Y).BackColor = &HFF&
  951.             If blnRebooting(Y) = False Then
  952.                 tmrAlert(0).Enabled = True
  953.                 LogIt ("Failed test for " & tmpURL)
  954.             Else
  955.                 'rebooting so dont alarm
  956.                 LogIt ("Failed test for " & tmpURL & "[REBOOTING]")
  957.                 tmrAlert(0).Enabled = False
  958.             End If
  959.             SSetting "LFail" & Y, Now
  960.             SSetting "Lcheck" & Y, Now
  961.             If LSetting("DownSince" & Y) = "" Then
  962.                  SSetting "DownSince" & Y, Now
  963.             Else
  964.                 'already down
  965.             End If
  966.             strM = Left(ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), InStr(1, ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), ":") - 1)
  967.             strS = Mid(ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), InStr(1, ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), ":") + 1)
  968.             strErrMsg = "Warning! Critical service failure for " & LSetting("MName" & Y) & " at  " & LSetting("LFail" & Y) & " Service has not responded for " & _
  969.                     strM & " Minutes and " & strS & " Seconds"
  970.             SayThis strErrMsg
  971.         Else
  972.             If InStr(1, LSetting("LFail" & Y), "/") > 0 Then
  973.                 'already has a date
  974.             Else
  975.                 'not failed ever
  976.                 SSetting "LFail" & Y, "None"
  977.             End If
  978.             SSetting "DownSince" & Y, ""
  979.             SSetting "Lcheck" & Y, Now
  980.             'okay
  981.             blnRebooting(Y) = False
  982.             frmPopups.mnuReboot.Caption = "Reboot Server"
  983.         End If
  984.     Next Y
  985. End Sub
  986. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  987.    Dim fml As Long
  988.    Dim fmt As Long
  989.    Dim a As Integer
  990.     For a = 0 To 7
  991.         lblServer(a).BorderStyle = 0
  992.     Next a
  993.    If mmflag = True Then
  994.       fml = Me.Left: fmt = Me.Top
  995.       If X > sax Then Me.Left = fml + (X - sax)
  996.         If X < sax Then Me.Left = fml - (sax - X)
  997.       If Y > Say Then Me.Top = fmt + (Y - Say)
  998.       If Y < Say Then Me.Top = fmt - (Say - Y)
  999.    End If
  1000.    Image1.BorderStyle = 0
  1001.    Image2.BorderStyle = 0
  1002.    Image3.BorderStyle = 0
  1003.    Image4.BorderStyle = 0
  1004.    End Sub
  1005. Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1006. If mmflag = False Then
  1007.       sax = X
  1008.       Say = Y
  1009.       mmflag = True
  1010.    End If
  1011.    Me.MousePointer = vbSizePointer
  1012.    End Sub
  1013. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1014.     mmflag = False
  1015.    Me.MousePointer = vbDefault
  1016. End Sub
  1017. Private Sub tmrScroll_Timer()
  1018.     With lblScroll
  1019.         DoEvents
  1020.         .Left = .Left + 15
  1021.         If .Left > 9000 Then
  1022.             .Left = -6120
  1023.         End If
  1024.     End With
  1025. End Sub
  1026. Private Sub tmrUpdater_Timer()
  1027. On Error GoTo e_trap
  1028. Dim intTempNext As Integer
  1029. If LSetting("DownSince" & intServClicked) <> "" Then
  1030.         lblDT = ConvertToHMS(DateDiff("s", LSetting("DownSince" & intServClicked), Now))
  1031.         lblDT = "None"
  1032. End If
  1033.     lblCurrentTime.Caption = Format(Now, "hh:mm:ss")
  1034.     DoEvents
  1035.     intTempNext = DateDiff("s", Now, DateAdd("s", (tmrMon.Interval / 1000), LSetting("LCheck" & intServClicked)))
  1036.     If intTempNext > tmrMon.Interval Or intTempNext < 0 Then
  1037.         lblNextCheck = "Unknown"
  1038.     Else
  1039.         lblNextCheck = intTempNext
  1040.     End If
  1041. Exit Sub
  1042. e_trap:
  1043.     lblNextCheck = "Unknown"
  1044. End Sub
  1045.